package com.org.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.org.bean.system.UserInfo;
import com.org.dao.system.UserInfoMapper;
import com.org.service.UserService;

@Service("userService")
public class UserServiceimpl implements UserService {
	@Autowired
	private UserInfoMapper userInfoMapper;

	@Override
	public List<UserInfo> findAll() {
		// TODO Auto-generated method stub
		return userInfoMapper.findAll();
	}

	@Override
	public List<UserInfo> findById(int userId) {
		// TODO Auto-generated method stub
		return userInfoMapper.findById(userId);
	}

	@Override
	public boolean addUser(UserInfo userInfo) {
		// TODO Auto-generated method stub
		return userInfoMapper.addUser(userInfo);
	}

	@Override
	public boolean deleteUser(int userId) {
		// TODO Auto-generated method stub
		return userInfoMapper.deleteUser(userId);
	}

	@Override
	public boolean updateUser(UserInfo userInfo) {
		// TODO Auto-generated method stub
		return userInfoMapper.updateUser(userInfo);
	}

	@Override
	public List<UserInfo> login(String username) {
		// TODO Auto-generated method stub
		return userInfoMapper.login(username);
	}

	@Override
	public List<UserInfo> findByName(String userName) {
		// TODO Auto-generated method stub
		return userInfoMapper.findByName(userName);
	}

	@Override
	public boolean modifyUser(UserInfo userInfo) {
		// TODO Auto-generated method stub
		return userInfoMapper.modifyUser(userInfo);
	}

}
